package com.example.dubbo.consumer;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * Dubbo Consumer 启动类
 */
@SpringBootApplication
@EnableDubbo  // 启用 Dubbo
public class ConsumerApplication {
    
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class, args);
        System.out.println("\n========================================");
        System.out.println("  Dubbo Consumer 启动成功！");
        System.out.println("  端口: 8082");
        System.out.println("  Nacos: localhost:8848");
        System.out.println("\n  测试接口:");
        System.out.println("  GET  http://localhost:8082/api/users");
        System.out.println("  GET  http://localhost:8082/api/users/1");
        System.out.println("  POST http://localhost:8082/api/users");
        System.out.println("========================================\n");
    }
}

